package com.kingdee.eas.fi.fa.manage.client;

import java.awt.Component;
import java.util.Hashtable;

import com.kingdee.bos.ctrl.swing.KDLabelContainer;
import com.kingdee.bos.ctrl.swing.KDPromptBox;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
import com.kingdee.eas.basedata.person.Person;
import com.kingdee.eas.basedata.person.PersonFactory;
import com.kingdee.eas.basedata.person.PersonInfo;
import com.kingdee.eas.custom.depuitls.DEPUtils;
import com.kingdee.eas.fi.fa.manage.FaStocktakingBillInfo;
import com.kingdee.eas.fi.fa.manage.FaStocktakingTaskBillInfo;

public class FaStocktakingBillEditUICTEx extends FaStocktakingBillEditUI {

	KDPromptBox prmtkdZhupPerson=null;
	KDPromptBox prmtkdJianpPerson = null;
	public FaStocktakingBillEditUICTEx() throws Exception {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public void onLoad() throws Exception
	{
		super.onLoad();
		FaStocktakingTaskBillInfo task = (FaStocktakingTaskBillInfo)getUIContext().get("TASK_INFO");
		if(task!=null)
		{
		PersonInfo person=(PersonInfo)task.get("kdJianPPerson");
		PersonInfo person1=(PersonInfo)task.get("kdZhuPPerson");
		if(person!=null)  
		{
			person=PersonFactory.getRemoteInstance().getPersonInfo(new ObjectUuidPK(person.getId()));
		}  
		if(person1!=null)
		{
			person1=PersonFactory.getRemoteInstance().getPersonInfo(new ObjectUuidPK(person1.getId()));
		}
        Hashtable<String, Component> hashTable = new Hashtable<String, Component>();		
		DEPUtils.findComponent(this, new String[]{"prmtkdZhupPerson","prmtkdJianpPerson"},hashTable);
		if (hashTable.containsKey("prmtkdZhupPerson")){
			prmtkdZhupPerson = (KDPromptBox)hashTable.get("prmtkdZhupPerson");
			prmtkdZhupPerson.setValue(person1);
		}  
		if(hashTable.containsKey("prmtkdJianpPerson"))
		{
			prmtkdJianpPerson=(KDPromptBox)hashTable.get("prmtkdJianpPerson");
			prmtkdJianpPerson.setValue(person);
		}
	  }  
	}
}
